.calc-container {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #f5f5f5;
  height: 100vh;
  // padding: 20px;
  box-sizing: border-box;
  font-size: 28px;
}

.calc-title {
  width: 100%;
  text-align: center;
  font-weight: bold;
  margin: 50px 0px;
  font-size: 34px;
  color: #333;
}
.header-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 20px;
}
.form-section {
  width: 700px;
  height: 500px;
  font-size: 24px;
  background-color: #fff;
  border-radius: 20px;
  padding: 20px 0;
  box-sizing: border-box;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 25px;
}

.calc-field {
  height: 80px;
  width: 600px;
  margin-bottom: 20px;
  background-color: #f5f5f5;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .label {
    font-size: 28px;
    color: #333;
    font-weight: 500;
  }

  .input {
    width: 60%;
    height: 56px;
    border: none;
    background: transparent;
    text-align: right;
    font-size: 28px;
    color: #666;

    &::placeholder {
      color: #999;
    }
  }
}
.calc-field:last-child {
  margin-bottom: 0;
}

.calc-radio-field {
  cursor: pointer;
  position: relative;

  &::after {
    content: "\3E";
    position: absolute;
    right: 15px;
    color: #999;
    font-weight: 400;
    font-size: 28px;
  }

  .selection {
    font-size: 28px;
    color: #666;
    margin-right: 20px;
    text-align: right;
  }
}

.btn-calc {
  width: 600px;
  height: 90px;
  margin: 30px auto;
  font-size: 32px;
  line-height: 90px;
  border-radius: 60px;
  background-color: #ea5a5a;
  color: #fff;
  font-weight: 500;
  border: none;
  text-align: center;
  box-shadow: 0 5px 15px rgba(234, 90, 90, 0.3);
  transition: all 0.3s ease;

  &:active {
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(234, 90, 90, 0.3);
  }

  &:disabled {
    opacity: 0.8;
  }

  .loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }

  .btn-loading {
    margin-right: 10px;
  }
}

.results-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-back {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 140px;
  height: 50px;
  background-color: #fff;
  border: none;
  color: #333;
  font-size: 28px;
  padding: 0 10px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;

  &::before {
    content: "\3C";
    margin-right: 5px;
    font-weight: bold;
  }
}

.result-block {
  width: 100%;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 0 0 20px 20px;
  padding: 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;

  .block-title {
    font-weight: 500;
    font-size: 24px;
    padding: 15px;
    background-color: #fff;
    text-align: center;
    border-bottom: 1px solid #eee;
  }

  .summary {
    width: 100%;
    padding: 25px;
    background-color: #ea5a5a;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    text {
      font-size: 26px;
      width: 48%;
      margin-bottom: 20px;
      font-weight: 400;

      &:first-child {
        width: 100%;
        font-size: 36px;
        font-weight: 500;
        margin-bottom: 25px;
        text-align: center;
      }
    }
  }

  .schedule {
    width: 100%;
    padding: 0;
    background-color: #fff;
    position: relative;

    .row {
      display: flex;
      justify-content: space-between;
      padding: 18px 15px;
      border-bottom: 1px solid #eee;

      &.header {
        font-weight: bold;
        background-color: #f5f5f5;
        color: #333;
        position: sticky;
        top: 0;
        z-index: 5;
      }

      &:nth-child(even) {
        background-color: #fafafa;
      }

      text {
        width: 25%;
        text-align: center;
        color: #333;
        font-size: 26px;
      }
    }

    .scroll-container {
      height: calc(100vh - 350px); /* 视口高度减去标题、tab栏和summary的高度 */
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    /* 底部安全区域 */
    .safe-area-bottom {
      height: 40px; /* 安全区域高度 */
      width: 100%;
    }
  }
}

// 标签页样式
.tab-group {
  display: flex;
  width: 100%;
  background-color: #ea5a5a;
  border-radius: 15px 15px 0 0;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);

  .tab-item {
    flex: 1;
    text-align: center;
    padding: 22px 0;
    font-size: 28px;
    background-color: #ea5a5a;
    color: #fff;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;

    &.active {
      background-color: #fff;
      color: #ea5a5a;
      font-weight: 500;
    }

    &:hover:not(.active) {
      background-color: rgba(255, 255, 255, 0.1);
    }
  }
}

.popup-header {
  width: 100%;
  padding: 24px;
  text-align: center;
  font-weight: bold;
  border-bottom: 1px solid #eee;
  font-size: 28px;
}

.popup-radio {
  padding: 18px 15px;
  font-size: 28px;
}

// 弹窗按钮区域样式
.popup-buttons {
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  margin: 20px 0;
}

.btn-confirm {
  width: 45%;
  font-size: 28px;
  height: 70px;
  line-height: 70px;
  border-radius: 60px;
  background-color: #ea5a5a;
  color: #fff;
  border: none;
  text-align: center;
  box-shadow: 0 2px 8px rgba(234, 90, 90, 0.2);
}

.btn-cancel {
  width: 45%;
  font-size: 28px;
  height: 70px;
  line-height: 70px;
  border-radius: 60px;
  background-color: #f5f5f5;
  color: #333;
  border: none;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Taroify Popup组件样式覆盖 */
:global(.taroify-popup--bottom) {
  width: 80% !important;
  left: 10% !important;
  right: 10% !important;
  border-radius: 20px 20px 0 0 !important;
}
